]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st-label: Unset clutter text instance on disposal
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Mon, 28 May 2018 23:28:26 +0000 (02:28 +0300)
committerMarco Trevisan (Treviño) <mail@3v1n0.net>
Mon, 28 May 2018 23:28:26 +0000 (02:28 +0300)
The instance is owned by the actor (being its child), and thus when the
disposal happens for the parent the text is disposed too, thus it's just
safer to nullify its reference so that we won't try to access to invalid
objects later, and this might be the case since the JS objects could be kept
around until they aren't finalized.

https://bugzilla.gnome.org/show_bug.cgi?id=788931

src/st/st-label.c

index a7893b074523ee10e25c596f2c67059a96aece0c..515e34323c863c50bd7a12d5387c0cca26fe184c 100644 (file)
@@ -180,6 +180,7 @@ st_label_dispose (GObject   *object)
 {
   StLabelPrivate *priv = ST_LABEL (object)->priv;
 
+  priv->label = NULL;
   g_clear_pointer (&priv->text_shadow_pipeline, cogl_object_unref);
 
   G_OBJECT_CLASS (st_label_parent_class)->dispose (object);